package com.dgshanger.sanhxiaofeisc.adapter

import android.view.View
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.dgshanger.sanhxiaofeisc.R
import com.dgshanger.sanhxiaofeisc.entity.CommentListEntity

/**
 * Created by JacobHHH on 2018/4/20.
 */
class CommentListAdapter(layoutResId : Int, data : List<CommentListEntity>) : BaseQuickAdapter<CommentListEntity, BaseViewHolder>(layoutResId,data) {

    override fun convert(helper: BaseViewHolder?, item: CommentListEntity?) {
        helper!!.setText(R.id.tv_name,item!!.user_name)
        helper.setText(R.id.tv_score,item.score)
        helper.setText(R.id.tv_content,item.content)
        helper.setText(R.id.tv_time,item.created_at)
        val tv_reply = helper.getView<TextView>(R.id.tv_reply)
//        if ("0".equals(item.is_reply)){
//            tv_reply.visibility= View.GONE
//        }else{
//            tv_reply.visibility= View.VISIBLE
//        }
    }

}